﻿namespace Aquarinum.WebSocekt.ClientSdk.NET35.Dtos
{
    public enum ApiResultCode
    {
        /// <summary>
        ///     成功
        /// </summary>
        Success = 0,

        /// <summary>
        ///     失败，未知错误
        /// </summary>
        Failed = 1,

        #region 认证授权

        /// <summary>
        ///     未知授权错误
        /// </summary>
        UnknownAuthorizationError = 1999,

        /// <summary>
        ///     缺少令牌
        /// </summary>
        TokenMissing = 1011,

        /// <summary>
        ///     令牌过期
        /// </summary>
        TokenExpired = 1012,

        /// <summary>
        ///     令牌无效
        /// </summary>
        TokenInvalid = 1013,

        /// <summary>
        ///     用户名或密码错误
        /// </summary>
        AccountError = 1021,

        /// <summary>
        ///     账号不存在
        /// </summary>
        AccountNotExist = 1022,

        /// <summary>
        ///     账号无效（未生效或已失效）
        /// </summary>
        AccountInvalid = 1023,

        /// <summary>
        ///     账号锁定/禁用
        /// </summary>
        AccountLocked = 1024,

        /// <summary>
        ///     认证失败
        /// </summary>
        AuthorizationFailed = 1025,

        /// <summary>
        ///     用户权限不足
        /// </summary>
        InsufficientUserPermission = 1030,

        #endregion 认证授权

        #region 系统预设错误码

        /// <summary>
        ///     服务器繁忙
        /// </summary>
        ServerBusy = 2001,

        /// <summary>
        ///     服务不可用
        /// </summary>
        ServiceUnavailable = 2002,

        /// <summary>
        ///     远程服务出错
        /// </summary>
        ServiceRemoteError = 2003,

        /// <summary>
        ///     服务不在线
        /// </summary>
        ServiceNotOnline = 2004,

        /// <summary>
        ///     请求被禁止
        /// </summary>
        ForbiddenRequest = 2005,

        /// <summary>
        ///     未授权的IP地址
        /// </summary>
        UnauthorizedClientIp = 2006,

        /// <summary>
        ///     用户请求次数超限
        /// </summary>
        UserRequestsExceeded = 2010,

        /// <summary>
        ///     用户请求频率超限
        /// </summary>
        UserRequestFrequencyExceeded = 2011,

        /// <summary>
        ///     应用调用次数超限
        /// </summary>
        AppRequestsExceeded = 2012,

        /// <summary>
        ///     应用调用频率超限
        /// </summary>
        AppRequestFrequencyExceeded = 2013,

        /// <summary>
        ///     IP请求次数超限
        /// </summary>
        IpRequestsExceeded = 2014,

        /// <summary>
        ///     IP请求频率超限
        /// </summary>
        IpRequestFrequencyExceeded = 2015,

        /// <summary>
        ///     回调地址不合法
        /// </summary>
        CallbackAddressIsIllegal = 2016,

        /// <summary>
        ///     接口不存在
        /// </summary>
        RequestApiNotFound = 2017,

        /// <summary>
        ///     任务超时
        /// </summary>
        JobExpired = 2018,

        /// <summary>
        ///     接口权限受限
        /// </summary>
        InsufficientApiPermission = 2019,

        /// <summary>
        ///     非法请求
        /// </summary>
        IllegalRequest = 2020,

        /// <summary>
        ///     协议不合法
        /// </summary>
        IllegalProtocol = 2021,

        /// <summary>
        ///     请求的Http Method不支持
        /// </summary>
        HttpMethodIsNotSuported = 2022,

        /// <summary>
        ///     重复请求
        /// </summary>
        RepeatRequest = 2023,

        /// <summary>
        ///     无效的转换异常
        /// </summary>
        InvalidCastException = 2024,

        /// <summary>
        ///     时间戳不正确
        /// </summary>
        TimestampRefused = 2025

        #endregion 系统预设错误码
    }
}